package dbTools.tableInfo.field.fields;

import dbTools.tableInfo.field.Field;

public class NumberField extends Field{
	
	private int scale;
	
	public NumberField(String varNum,
			String varKey,
			String varItemName,
			String varFiledName, 
			String varDataType, 
			String varChar,
			String varLenght, 
			String varCon, 
			String varNotNull,
			String varDefault, 
			String varMin, 
			String varMax) {
		super(varNum, varKey, varItemName, varFiledName, varDataType, varChar,
				varLenght, varCon, varNotNull, varDefault, varMin, varMax);

		this.dataTypeString=Field.TYPE_LONG;
		
		if(varLenght!=null&&varLenght.length()>0&&varLenght.split(",").length>1){
			this.scale=Integer.parseInt(varLenght.split(",")[1]);
		}

	}

	public int getScale() {
		return scale;
	}

	public void setScale(int scale) {
		this.scale = scale;
	}
	
	
}
